<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台数组循环遍历</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for='stu in students'>
                {{ stu.id }} --
                {{ stu.name }}
            </li>
        </ul>
    </div>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <script>
        let app = new Vue({
            el: '#app',
            data(){
                return {
                    students:[
                        {
                            id : 1,
                            name : '美目盼兮'
                        },
                        {
                            id : 2,
                            name : '巧笑倩兮'
                        },
                        {
                            id : 3,
                            name : '螓首蛾眉'
                        },
                        {
                            id : 4,
                            name : '肤如凝脂'
                        }
                    ]
                }
            }            
        })
    </script>
</body>
</html>